<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <child>
          <div slot-scope="props">
              <div>父组件</div>
              <h3>{{ props.text }}</h3>
          </div>
      </child>
  </div>
</body>

<script src="lib/vue.js"></script>
<script type="text/javascript">
  Vue.component('child', {
      template: `
          <div>
            <slot text="我是子组件中的内容"></slot>
          </div>
    `
  })
  const vm = new Vue({
      el: '#app'
  })
</script>
</html>